package simpleTaskDispatcher.model.tasks.impl;

import simpleTaskDispatcher.model.tasks.ITaskAllowedAfterTaskQueueClose;


public class SetParameterTask extends ContextFreeTask implements ITaskAllowedAfterTaskQueueClose {

	private final String name;
	private final Object value;
	
	public SetParameterTask(String name, Object value) {
		this.name = name;
		this.value = value;
		this.setWorkValue(0);
	}
	
	@Override
	public void execute() throws InterruptedException {
		setSharedParameter(name, value);
	}

	public String getName() {
		return name;
	}

	public Object getValue() {
		return value;
	}

}
